package com.c.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.c.entity.Menu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wangxiangli
 * @create 2022-12-23-22:24
 */
@Repository
public interface MenuMapper extends BaseMapper<Menu> {

    //通过用户名查询菜单
    List<Menu> findMenuByUsername(String username);

    //回显角色菜单信息
    Integer[] findMenuIdsByRoleId(Integer id);

    //分页查询
    IPage<Menu> getTreeData(IPage<Menu> pageMenu, @Param("queryString") String queryString);

    //查询父菜单信息
    List<Menu> findAllParent();

    //删除t_role_menu 表中的菜单数据
    void deleteRoleMenuById(Integer id);
}
